Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TimeManagerV5 remove function pointer and add conditional logic #25

Merged
merged 1 commit into from
May 13, 2024

Conversation

0xlucian
Copy link
Contributor

Description

This PR removes the _getCurrentSlot function pointer and changes the logic of getBlockNumberOrTimestamp() to not refer to _getCurrentSlot pointer but to either call _getBlockTimestamp() or _getBlockNumber() based on a conditional logic of the isTimeBased storage var.

Checklist

  • I have updated the documentation to account for the changes in the code.
  • If I added new functionality, I added tests covering it.
  • If I fixed a bug, I added a test preventing this bug from silently reappearing again.
  • My contribution follows Venus contribution guidelines.

@0xlucian 0xlucian self-assigned this May 13, 2024
contracts/TimeManagerV5.sol Outdated Show resolved Hide resolved
Copy link

Code Coverage

Package Line Rate Branch Rate Health
contracts 24% 30%
Summary 24% (15 / 62) 30% (9 / 30)

@chechu chechu merged commit d1d7e86 into develop May 13, 2024
3 checks passed
@chechu chechu mentioned this pull request May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants